home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright 1993, 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- #include <Xm/Xm.h>
- #include <Xm/Form.h>
- #include <Xm/PushB.h>
- #include <stdio.h>
- #include "main.h"
-
- static Boolean queryServer (Display * display)
- {
- int major_opcode = 0, first_event = 0, first_error = 0;
- return XQueryExtension(display, "SGI-SUNDRY-NONSTANDARD",
- &major_opcode, &first_event, &first_error);
- }
-
- int main (int argc, char ** argv)
- {
- XtAppContext app_context;
- Widget toplevel = NULL;
- Widget form = NULL, frame = NULL;
- Display * display = NULL;
- int num_options = 0;
- XrmOptionDescRec * options = getResourceDescriptions(&num_options);
-
- XtToolkitInitialize();
- app_context = XtCreateApplicationContext ();
- setFallbackResources(app_context);
- display = XtOpenDisplay(app_context, NULL, getAppName(), getAppClass(),
- options, num_options, &argc, argv);
- toplevel = XtVaAppCreateShell(getAppName(), getAppClass(),
- applicationShellWidgetClass,
- display,
- XtNargc, argc,
- XtNargv, argv,
- NULL);
-
- if (queryServer(XtDisplay(toplevel)) == True) {
- form = XtVaCreateWidget("form", xmFormWidgetClass, toplevel,
- NULL);
-
- frame = setupDesktop(form, app_context);
- setupGLWidget(frame);
- showGLWidget(frame);
-
- XtManageChild(form);
- XtRealizeWidget(toplevel);
- XtAppMainLoop(app_context);
- }
- else {
- fprintf(stderr, "You must run this on an SGI server\n");
- return 1;
- }
- }
-
-